# -*-coding:utf-8 -*-
import random


class person(object):
    def __init__(self, exceptvalue):
        self.expectvalue = exceptvalue
        self.amount = 0

    def next(self):
        return 1 if random.randint(0, 100) * self.expectvalue > 250 else 0


def dufun(p1, p2):
    r1 = p1.next()
    r2 = p2.next()
    print u"李斯出{p1}，韩非出{p2}".format(p1=u"正面" if r1 == 1 else u"反面", p2=u"正面" if r2 == 1 else u"反面")
    if r1 == 1 and r2 == 1:
        p1.amount += 3
    elif r1 == 0 and r2 == 0:
        p1.amount += 1
    else:
        p2.amount += 2


p1 = person(7)
p2 = person(3)
for i in range(8):
    dufun(p1, p2)
    print u"第{i}局李斯{p1}，韩非{p2}".format(i=i+1,p1=p1.amount, p2=p2.amount)
